package com.bestcem.xm.award.enums;

import com.bestcem.xm.common.core.enums.CommonEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author xa.zhang <xa.zhang@idiaoyan.com>
 * @version v1.0
 * @date 2021/6/23 17:01
 */
@Getter
@AllArgsConstructor
public enum PointRecordStatusEnum implements CommonEnum {

    /**
     * 请求通过
     */
    PASS(0, "请求通过"),
    /**
     * 未中奖
     */
    NOWIN(1, "未发奖"),
    /**
     * 已中奖
     */
    WIN(2, "已发奖");


    private int index;

    private String name;


    public static String getNameByIndex(int index) {
        for (PointRecordStatusEnum temp : PointRecordStatusEnum.values()) {
            if (temp.getIndex() == index) {
                return temp.getName();
            }
        }
        return "";
    }


}
